#ifndef NANE_SOUNDSOURCEIMPL__H
#   define  NANE_SOUNDSOURCEIMPL__H

#   include "nane/SoundSystem/SoundSource.h"
#   include "nane/SoundSystem/SoundBuffer.h"
#   include "nane/SoundSystem/SoundSystemImpl_.h"

#   include <vector>

namespace nane
{
    class SoundSource::Implementation
        : public SubSystemProductImpl<SoundSource::Implementation, SoundSystem::Implementation, ISoundSource*>
    {
    public:
        struct EState
            : public Enum<EState>
        {
            enum domain
            {
                Stopped = 0,
                PendingPlay,
                Playing,
                PendingStop,

                _max
            };

            NANE_ENUM( EState, Enum );
        };

    public:
        Implementation( SoundSystem::Implementation* _creator, ISoundSource* _interface );
        ~Implementation();
        
        virtual bool Update( uint32 _ms );

    public:
        std::vector<SoundBuffer> buffers;
        uint32 positionMs;
        uint32 lengthMs;
        EState state;
    };
}   // namespace nane

#endif	// NANE_SOUNDSOURCEIMPL__H
